﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.Objects.DataClasses;

namespace Model.Movie
{
    internal class BackdropsConverter
    {
        internal static IEnumerable<byte[]> GetEntities(EntityCollection<Backdrops> entities)
        {
            var results = new List<byte[]>();

            foreach (var entity in entities)
            {
                results.Add(entity.Image);
            }

            return results;
        }

        internal static Backdrops GetEntity(byte[] image)
        {
            return new Backdrops()            
            {                  
                Id = Guid.NewGuid(),                   
                Image = image            
            };
        }
    }
}
